<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('部门新增')" />
    <style>
        .deptName{
            max-height: 200px;
            width: 92%;
            display: none;
            position: absolute;
            top:100%;
            z-index: 100;
            border-top: none;
        }
    </style>
</head>
<body>
<div class="container">
    <form class="layui-form mt20" lay-filter="form-dept">
        <input type="hidden" name="parentId" th:value="${dept.deptId}"/>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="required-msg ">*</span>上级部门：</label>
            <div class="layui-input-block">
                <input class="layui-input min-input readonly" type="text" id="treeName" lay-verify="required" lay-verType="tips" readonly th:value="${dept.deptName}" >
                <div class="eleTree deptName" lay-filter="deptNameTree"></div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="required-msg ">*</span>部门名称：</label>
            <div class="layui-input-block">
                <input class="layui-input min-input" type="text" name="deptName" lay-verify="required" lay-verType="tips" placeholder="" autocomplete="off" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="required-msg ">*</span>显示排序：</label>
            <div class="layui-input-block">
                <input class="layui-input min-input" type="text" name="orderNum" lay-verify="required|number" lay-verType="tips" placeholder="" autocomplete="off" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">负责人：</label>
            <div class="layui-input-block">
                <input class="layui-input min-input" type="text" name="leader" placeholder="" autocomplete="off" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">联系电话：</label>
            <div class="layui-input-block">
                <input class="layui-input min-input" type="text" name="phone" placeholder="" autocomplete="off" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">部门状态：</label>
            <div class="layui-input-block">
                <span th:each="dict : ${@dict.getType('sys_normal_disable')}">
                    <input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:title="${dict.dictLabel}" th:checked="${dict.isDefault == 'Y' ? true : false}" />
                </span>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">部门类型：</label>
            <div class="layui-input-block">
<!--                <input class="layui-input min-input" type="text" name="deptType" placeholder="" autocomplete="off" />-->
                <span th:each="dict : ${@dict.getType('sys_dept_type')}">
                    <input type="radio" th:id="${dict.dictCode}" name="deptType" th:value="${dict.dictValue}" th:title="${dict.dictLabel}" />
                </span>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">部门等级：</label>
            <div class="layui-input-block">
<!--                <input class="layui-input min-input" type="text" name="deptLevel" placeholder="" autocomplete="off" />-->
                <span th:each="dict : ${@dict.getType('sys_dept_level')}">
                    <input type="radio" th:id="${dict.dictCode}" name="deptLevel" th:value="${dict.dictValue}" th:title="${dict.dictLabel}" />
                </span>
            </div>
        </div>
        <div class="layui-form-item layui-hide">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="btn-add" id="btn-add">保存</button>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<script th:src="@{/js/system/dept_form.js}"></script>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('system:dept:edit')}]];
</script>
</body>
</html>